import { createApp } from 'vue'
import './style.css'
import '@/assets/less/index.less'
import App from './App.vue'


import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
//注册@element-plus/icons-vue图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

import router from './router'
import { createPinia } from 'pinia'
const pinia = createPinia()

const app =createApp(App)
app.use(pinia)
app.use(router)
app.use(ElementPlus)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

import api from '@/api/api'

app.config.globalProperties.$api = api
import '@/api/mock.js'
app.mount('#app')
